import 'package:flutter/material.dart';

class RecyclePage extends StatelessWidget {
  const RecyclePage({super.key});
  @override
  Widget build(BuildContext context) {
    return Theme(
        data: ThemeData.dark(),
        child: Scaffold(
          appBar: AppBar(
            titleSpacing: 10,
            title: Row(
              // mainAxisAlignment: MainAxisAlignment.center,
              children: const [
                Icon(
                  Icons.access_alarm,
                ),
                Text("Recycle view")
              ],
            ),
            centerTitle: true,
          ),
          body: Container(
            constraints: const BoxConstraints.expand(),
            decoration: const BoxDecoration(color: Colors.blueGrey),
            child: ListView.separated(
              separatorBuilder: (context, index) => const Divider(
                height: 1,
                thickness: 0.5,
                color: Colors.black,
              ),
              itemBuilder: itemBuild,
              itemCount: 100,
            ),
          ),
        ));
  }

  Widget itemBuild(context, index) {
    return Container(
      height: 50,
      color: Colors.red,
      alignment: Alignment.centerLeft,
      padding: const EdgeInsets.all(13),
      child: Text(
        "data $index",
        style: const TextStyle(backgroundColor: Colors.blue),
      ),
    );
  }
}
